chore(alerts): Remove triggered_incidents from AlertRuleTrigger#115449
Conversation
| ] | ||
|
|
||
| operations = [ | ||
| SafeRemoveField( |
There was a problem hiding this comment.
I guess I've never removed a m2m field before - I got a couple errors trying to either first set it to be nullable (which makes sense) or adding a db_constraint=False - lmk if there is something else I need to do here.
There was a problem hiding this comment.
Since the many-to-many is managed via a through table that has FKs to this table I think this is all you need to do. Probably for completeness you need to do the final deletion migration too, but I think it will be a no-op
|
This PR has a migration; here is the generated SQL for for --
-- Moved alertruletrigger.triggered_incidents field to pending deletion state
--
-- (no-op) |
| ] | ||
|
|
||
| operations = [ | ||
| SafeRemoveField( |
There was a problem hiding this comment.
Since the many-to-many is managed via a through table that has FKs to this table I think this is all you need to do. Probably for completeness you need to do the final deletion migration too, but I think it will be a no-op
Prepare to remove
IncidentTriggerby removing thetriggered_incidentscolumn fromAlertRuleTrigger.